﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace WindowsGame1
{
    public abstract class Sprite
    {
        private Texture2D _myTexture;
        private Vector2 _myPosition;
        private float _mySpeed;

        public virtual float MySpeed
        {
            get { return _mySpeed; }
            set { _mySpeed = value; }
        }

        public virtual Texture2D MyTexture
        {
            get { return _myTexture; }
            set { _myTexture = value; }
        }

        public virtual Vector2 MyPosition
        {
            get { return _myPosition; }
            set { _myPosition = value; }
        }

        public abstract  void Initialize();

        public virtual void LoadContent(ContentManager myContentManager, string myAssetName)
        {
            MyTexture = myContentManager.Load<Texture2D>(myAssetName);
        }

        public abstract void HandleInput(KeyboardState myKeyboardState, MouseState myMouseState, Rectangle myScreen);

        public abstract void Draw(SpriteBatch mySpriteBatch, GameTime myGameTime, Rectangle myScreen);
        public virtual void Draw(SpriteBatch mySpriteBatch, GameTime myGameTime)
        {
            mySpriteBatch.Draw(MyTexture, MyPosition, Color.White);
        }

    }
}
